﻿// <copyright file="WebservicesAccountAdapter.cs" company="FounderSoftware">
// Copyright (c) 2008 All Right Reserved
// </copyright>
// <author>situyiwen</author>
// <email>situ_yiwen@Founder.com</email>
// <date>2010-12-4</date>
// <summary> 适配器接口类</summary>

using System.Xml;

namespace SZJT.Framework.Adapter
{
    public interface IAdapter
    {
        /// <summary>
        /// 适配器类型
        /// </summary>
        string Category{ get; }
        /// <summary>
        /// 用户标识
        /// </summary>
        string UserId { get; set; }
        /// <summary>
        /// 服务端组件公钥
        /// </summary>
        string PublicKeyString { get; }
        /// <summary>
        /// 适配器对应应用列表
        /// </summary>
        string TaskListString { get; }
        /// <summary>
        /// 数据读取接口方法
        /// </summary>
        /// <param name="taskGuid">应用标识</param>
        /// <param name="dataGuid">数据标识</param>
        /// <param name="dataType">数据类型</param>
        /// <returns>读取结果</returns>
        XmlNode GetData(string taskGuid, string dataGuid, string dataType);
        /// <summary>
        /// 数据写入接口方法
        /// </summary>
        /// <param name="taskGuid">应用标识</param>
        /// <param name="dataGuid">数据标识</param>
        /// <param name="dataType">数据类型</param>
        /// <param name="xmlData">待写入数据</param>
        /// <returns>写入操作返回值</returns>
        int SetData(string taskGuid, string dataGuid, string dataType, XmlNode xmlData);
        /// <summary>
        /// 数据查询接口方法
        /// </summary>
        /// <param name="taskGuid">应用标识</param>
        /// <param name="xmlTransform">查询条件</param>
        /// <returns>查询结果</returns>
        XmlNode TransformData(string taskGuid, XmlNode xmlTransform);
    }
}
